function sellerPageList(params: {
    name?: string;
    phone?: string;
    status?: any;
    province?: string;
    current: number;
    pageSize: number;
}) {
    return got<Stick.IPageListApiResultModel<Stick.ISeller>>({
        url: "/auth-api/seller/list/page",
        method: "get",
        params: params
    });
}

function addApi(data: { name: string; phone: string; province: string }) {
    return got({
        url: "/auth-api/seller",
        method: "post",
        data: data
    });
}

export function enableApi(id: string | number) {
    return got({
        url: `/auth-api/seller/${id}/enable`,
        method: "post"
    });
}

export function disableApi(id: string | number) {
    return got({
        url: `/auth-api/seller/${id}/disable`,
        method: "post"
    });
}

export function deleteApi(id: string | number) {
    return got({
        url: `/auth-api/seller/${id}`,
        method: "delete"
    });
}

export function sellerListApi(params: any) {
    return got<Stick.ISeller[]>({
        url: "/auth-api/seller/list",
        method: "get",
        params: params
    });
}

export const sellClient = {
    sellerPageList,
    addApi,
    enableApi,
    disableApi,
    deleteApi,
    sellerListApi
};
